<template>
	<view class="phone-login">
		<view class="phone-box">
			<view class="phone-logo">
				<image class="logo-img" :src="localIconSrc('logo.png')"></image>
				<view class="logo-text">爱云艺</view>
			</view>
			<view class="phone-form">
				<uni-forms ref="valiForm" :rules="rules" :modelValue="phoneFormData">
					<uni-forms-item label="" name="phone">
						<view class="phone-pre">
							<view class="icon">+86</view>
							<uni-easyinput
								:inputBorder="false"
								:styles="styles"
								primaryColor="#999"
								placeholderStyle="font-size: 32rpx;"
								v-model="phoneFormData.phone"
								placeholder="请输入手机号"
							/>
						</view>
					</uni-forms-item>
					<uni-forms-item label="" name="verificationCode">
						<view class="phone-fix">
							<uni-easyinput
							  :inputBorder="false"
								:styles="styles"
								:clearable="false"
								primaryColor="#999"
								placeholderStyle="font-size: 32rpx;"
								v-model="phoneFormData.verificationCode"
								placeholder="请输入验证码"
							/>
							<button class="check-btn">发送短信</button>
						</view>
					</uni-forms-item>
				</uni-forms>
			</view>
			<button class="phone-btn">登录/同意协议并注册</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				rules: {},
				phoneFormData: {
					phone: '1524555655'
				},
				styles: {
					borderColor: 'transparent',
					color: '#999'
				}
			}
		},
		onLoad(info) {
			console.log('gggg', info)
			this.phoneFormData.phone = info.phoneNumber
		}
	}
</script>

<style lang="scss" scoped>
	.phone-login {
		position: relative;
		width: 100vw;
		height: 100vh;
		.phone-box {
			width: 600upx;
			height: 792upx;
			position: absolute;
			left: 50%;
			top: 10%;
			transform: translate(-50%);
			.phone-logo {
				margin-bottom: 120upx;
				text-align: center;
				.logo-img {
					width: 192upx;
					height: 192upx;
				}
				.logo-text {
					color: #ff6005;
					font-size: 44upx;
				}
			}
			.phone-btn {
				color: #fff;
				background-color: #ff6005;
				border-radius: 40upx;
				margin-top: 120upx;
			  font-size: 32upx;
			}
		}
		.input-value {
			height: 80upx;
			font-size: 32upx;
			color: #666;
			padding: 10upx 0;
		}
		.phone-pre {
			display: flex;
			align-items: center;
			border-bottom: 1px solid #f0f0f0;
			padding: 32upx 0;
			.icon {
				font-size: 32upx;
				color: #333;
				margin-right: 36upx;
				text-align: center;
			}
		}
		.phone-fix {
			display: flex;
			align-items: center;
			border-bottom: 1px solid #f0f0f0;
			padding: 32upx 0;
			.check-btn {
				// width: 180upx;
				height: 70upx;
				line-height: 70upx;
				border-radius: 40upx;
				font-size: 32upx;
				border: 1px solid #999;
				color: #999;
			}
		}
	}
	::v-deep .uni-easyinput__content-input {
		color: #999;
		font-size: 32upx;
	}
</style>